package action;

import java.util.Date;

import action.base.BaseAction;

public class TeamInfoAction extends BaseAction {
	private String[] teamPersonName;
	private Integer[] teamPersonSex;
	private Date[] teamPersonBirthday;
	private Integer[] teamPersonEdu;
	private Integer[] teamPersonStep;
	private Integer[] teamPersonjob;
	public String[] getTeamPersonName() {
		return teamPersonName;
	}
	public void setTeamPersonName(String[] teamPersonName) {
		this.teamPersonName = teamPersonName;
	}
	public Integer[] getTeamPersonSex() {
		return teamPersonSex;
	}
	public void setTeamPersonSex(Integer[] teamPersonSex) {
		this.teamPersonSex = teamPersonSex;
	}
	public Date[] getTeamPersonBirthday() {
		return teamPersonBirthday;
	}
	public void setTeamPersonBirthday(Date[] teamPersonBirthday) {
		this.teamPersonBirthday = teamPersonBirthday;
	}
	public Integer[] getTeamPersonEdu() {
		return teamPersonEdu;
	}
	public void setTeamPersonEdu(Integer[] teamPersonEdu) {
		this.teamPersonEdu = teamPersonEdu;
	}
	public Integer[] getTeamPersonStep() {
		return teamPersonStep;
	}
	public void setTeamPersonStep(Integer[] teamPersonStep) {
		this.teamPersonStep = teamPersonStep;
	}
	public Integer[] getTeamPersonjob() {
		return teamPersonjob;
	}
	public void setTeamPersonjob(Integer[] teamPersonjob) {
		this.teamPersonjob = teamPersonjob;
	}
	public String execute() throws Exception{
		mgt.delAllInfo();
		for(int i=0;i<teamPersonName.length;i++){
			//消除空格没处理成功
			String tName = teamPersonName[i].replaceAll(" ", "");
			if(teamPersonName[i] == null || tName.trim() == ""){
				break;
			}
			mgt.addTeamInfoManager(teamPersonName[i], teamPersonSex[i], teamPersonBirthday[i], teamPersonEdu[i], 
					teamPersonStep[i], teamPersonjob[i]);
		}
		return "success";
	}
	
}
